<!DOCTYPE html>
<html class="pixel-ratio-1">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <title>登录</title>

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!--[if IE]>
  <script src="http://127.0.0.1:80/wx/ybss/js/html5shiv.min.js"></script>
  <![endif]-->

  <link href="../resource/style.css" rel="stylesheet" type="text/css">
  <link type="text/css" rel="stylesheet" href="../resource/fapiao.css">
  <link rel="stylesheet" href="../resource/weuimin.css" />
  <link rel="stylesheet" href="../resource/example.css" />
  <script src="../resource/md5.js"></script>
  <script src="../resource/jquery214.js"></script>
  <script src="../resource/fastclick.js"></script>
  <script src="../resource/jqueryweui.js"></script>
  <script src="../resource/zeptomin.js">
  </script><script src="../resource/picker.js"></script>
  <script src="../resource/api.js"></script>
  <script src="../resource/jquery1.js"></script>
<script src="../resource/ystfiles/qrcode.js"></script>
  <script src="../resource/jquerybarcode.js"></script>
  <script src="../script/api.js"></script>
  <script type="text/javascript" src="../script/constants.js"></script>
  <script type="text/javascript" src="../script/tmd5.js"></script>
  <script type="text/javascript" src="../script/aes.js"></script>
  <script type="text/javascript" charset="UTF-8" src="../script/naes.js"></script>
  <script type="text/javascript" src="../script/modeecb.js"></script>
  <style>
    .logo-license{margin-top:0px;}
    .left{font-weight:bold;}
    .info {margin-top: 5rem;border-width:0px;}
    .info ul{margin-top:1rem;}
    .info ul li{text-align:center;}
    html,.info{height:100%;}
    .info ul{width:96%;margin:0 auto;background:#FFF;margin-top:1rem;border-radius: 5px;box-shadow: #000 0 5px 5px -5px;}
    .info ul li div{width:80px;height:80px;background:blue;clear: both;margin:0 auto;border-radius: 40px;color:#FFF;line-height:75px;text-align:center;font-size:28px;}
    .weui-cell__bd p{font-size:14px;}
    .weui-cell__bd{min-width:165px;}




  </style>

</head>
<body style="background:#18b4ed;height:88%;">
<header id="statusBar">
  <img src="../image/back.png" onclick="api.closeFrame();" />
  <span style="text-align: center;width: 80%;margin: 0 auto;">我的推广二维码</span>
  <div style="clear:both"></div>
</header>


<div style="height:10px;"></div>

<article class="info" style=" margin-left: 6px;margin-right: 6px;padding: 1px;">
  <ul>
    <!-- 2017年7月26日10:03:59 by cph 二维码添加，更改布局 -->

    <!-- 条形码 -->
    <li  id="show" >

      <!-- 二维码 -->
      <p id="test" style="font-size: 20px">
      </p>
      

    </li>
    
	<li style="padding:0px;">

		    <img src="../image/js.jpg" width="100%"/>

	</li>
	<li>
    	<a href="javascript:void(0)" onclick="fxqr()" style="font-size:14px;color:#444"> 保 存 二 维 码</a>
    </li>

  </ul>

</article>

<script>
  var _qr = '';
  var zfqrno = '';
  var phone = $api.getStorage("dl_phone");
  apiready = function(){
    if(api.systemType == "ios"){
	   document.getElementById("statusBar").style.background = "#298cb4";
	}
    $api.fixStatusBar( $api.dom('header') );
    var qrcode = new QRCode("test", {
				    text: "http://wechat.scjinsui.com/weixin/wx/tglogin.jsp?phone=" + phone,
				    width: 250,
				    height: 250,
				    colorDark : "#000000",
				    colorLight : "#ffffff",
				    correctLevel : QRCode.CorrectLevel.H
				});
  }
 
function fxqr(){
		var FNScanner = api.require('FNScanner');
		FNScanner.encodeImg({
		    content: "http://wechat.scjinsui.com/weixin/wx/tglogin.jsp?phone=" + phone,
		    saveToAlbum: true,
		    saveImg: {
		        path: 'fs://'+ phone + '.png',
		        w: 250,
		        h: 250
		    }
		}, function(ret, err) {
			console.info("生成二维码结果：" + JSON.stringify(ret));
		    if (ret.status) {
//		    console.info("开始分享...");
//		    var sharedModule = api.require('shareAction');
//			sharedModule.share({
//				    text: '【金穗服务APP】我的推广二维码',
//				    type: 'image',
//				    path :ret.albumPath
//				});
//				console.info("分享结束...");
				alert("二维码图片保存成功！");
		    } else {
		        alert("二维码图片保存失败...");
		    }
		});
	}
	
</script>


</body></html>